package com.bestcem.xm.member.enums;

import com.bestcem.xm.common.core.enums.CommonEnum;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 同步类型枚举
 * @date 2021-08-15
 */
public enum SyncTypeEnum implements CommonEnum {
    /**
     * 即时同步
     */
    NOW("即时同步", 0),

    /**
     * 不同步
     */
    NEVER("不同步", 1);

    private String name;

    private int index;

    SyncTypeEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    public int getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public Boolean matches(Integer index){
        if(index == null){
            return false;
        }

        return index.equals(index);
    }
}
